package cn.caixiong.basic.service;

import cn.caixiong.basic.domain.BaseDomain;
import cn.caixiong.basic.query.BaseQuery;
import cn.caixiong.basic.util.PageList;


import java.util.List;

public interface IBaseService<T extends BaseDomain,Q extends BaseQuery> {
    //根据id查询
    T findOne (Long id);
    //查询所有
    List<T> findAll();
    //修改或新增
    void saveOrUpdate(T t);
    //删除
    void delete(Long id);
    //分页查询
    PageList<T> findPage(Q q);
    //批量删除
    void batchDelete(Long[] ids);
}
